#!/usr/bin/python

from scipy import stats
import numpy as np

np.random.seed(12345678)

print 'Score'
rvs1=[4-5, 3-1, 1-0, 7-5, 5-6, 3-5, 4-2, 5-6, 5-4, 1-4]
rvs2=[1-3, 3-2, 3-7, 6-3, 7-6, 8-5, 0-1, 3-5, 7-3, 5-8]
ttest=stats.ttest_ind(rvs1,rvs2)
print '  control vs. pass only: %.2f, %.2f' % (ttest[0], ttest[1])
rvs2=[1-5, 0-2, 2-4, 0-2, 4-4, 1-1, 4-3, 1-3, 1-4, 2-2]
ttest=stats.ttest_ind(rvs1,rvs2)
print '  control vs. pass and force field: %.2f, %.2f' % (ttest[0], ttest[1])
rvs1=[1-3, 3-2, 3-7, 6-3, 7-6, 8-5, 0-1, 3-5, 7-3, 5-8]
rvs2=[1-5, 0-2, 2-4, 0-2, 4-4, 1-1, 4-3, 1-3, 1-4, 2-2]
ttest=stats.ttest_ind(rvs1,rvs2)
print '  pass only vs. pass and force field: %.2f, %.2f' % (ttest[0], ttest[1])

print 'Ball possession'
rvs1=[41, 47, 41, 46, 41, 43, 42, 41, 42, 38]
rvs2=[40, 38, 37, 41, 42, 36, 36, 39, 39, 36]
ttest=stats.ttest_ind(rvs1,rvs2)
print '  control vs. pass only: %.2f, %.2f' % (ttest[0], ttest[1])
rvs2=[44, 41, 40, 40, 43, 42, 41, 39, 42, 47]
ttest=stats.ttest_ind(rvs1,rvs2)
print '  control vs. pass and force field: %.2f, %.2f' % (ttest[0], ttest[1])
rvs1=[40, 38, 37, 41, 42, 36, 36, 39, 39, 36]
rvs2=[44, 41, 40, 40, 43, 42, 41, 39, 42, 47]
ttest=stats.ttest_ind(rvs1,rvs2)
print '  pass only vs. pass and force field: %.2f, %.2f' % (ttest[0], ttest[1])

print 'Successful passes'
rvs1=[71, 77, 73, 78, 77, 67, 79, 70, 79, 71]
rvs2=[70, 70, 69, 78, 72, 70, 66, 75, 75, 79]
ttest=stats.ttest_ind(rvs1,rvs2)
print '  control vs. pass only: %.2f, %.2f' % (ttest[0], ttest[1])
rvs2=[73, 74, 70, 73, 71, 77, 71, 70, 65, 74]
ttest=stats.ttest_ind(rvs1,rvs2)
print '  control vs. pass and force field: %.2f, %.2f' % (ttest[0], ttest[1])
rvs1=[70, 70, 69, 78, 72, 70, 66, 75, 75, 79]
rvs2=[73, 74, 70, 73, 71, 77, 71, 70, 65, 74]
ttest=stats.ttest_ind(rvs1,rvs2)
print '  pass only vs. pass and force field: %.2f, %.2f' % (ttest[0], ttest[1])
